The codes here were used to produce the plots in the main text and supporting information. 
All codes have a brief summary of their function at the top of the file and refer to appropriate parts of the main text or Supporting Information where necessary.